#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <esp_log.h>
#include "st77903_driver.h"
#include "lv_port.h"

//#include "esp_wifi_webserver.h"

#include "bsp_info.h"
#include "drv_iic.h"
#include "dev_axp173.h"
#include "dev_hp203b.h"
#include "dev_imu.h"
#include "dev_location_5n31.h"
#include "imu.h"


#define TAG "main"
#define  delay_ms(ms)  vTaskDelay(ms / portTICK_PERIOD_MS)
extern  void dev_imu_get(struct bsp_t *dev);

/*
 * idf_component_register(SRCS ${SOURCES}
        INCLUDE_DIRS .
        REQUIRES lvgl st77903_driver
        )
 */
struct bsp_t bsp_sensors_info;


void location_sys_init(void)
{
	common_iic_init();
	axp173_init();
	delay_ms(300);
	HP203B_Reset();
	mpu6050_init();
	location_uart_init();
	//esp_wifi_webserver();
}

void app_main(void) {
	location_sys_init();
	lvgl_init();
}
